package top.songxs.gmall.order.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Data
public class OrderSubmitDTO {

    @NotBlank(message = "收件人名称不能为空")                          // 该字段的值不能是null、"" 、"          "
    private String consignee ;          // * @NotNull   验证对象是否不为null, 无法查检长度为0的[字符串]

    @NotBlank(message = "手机号码不能为空")
    @Length(min = 5 , max = 11 , message = "手机号码的格式不正确")  //数据校验
    private String consigneeTel ;

    @NotBlank(message = "收件人地址不能为空")
    private String deliveryAddress ;

    // 支付方式
    private String paymentWay = "online";

    // 订单备注
    private String orderComment ;

    private List<DetailDTO> orderDetailList ;

}
